<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <title>任务详情</title>
    <meta name="viewport" content="width=device-width, initial-scale=1.0,user-scalable=no">
    <meta name="keywords" content=""/>
    <meta name="description" content=""/>
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <link rel="stylesheet" href="css/cui.css"/>
    <link rel="stylesheet" href="css/lib.css"/>
    <link rel="stylesheet" href="css/style.css"/>
</head>
<body>
<!-- 头部 -->
<section id="hd">
    <div class="hdl"><a onclick="history.back()" class="a-back"></a></div>
    <h3>历史任务</h3>
</section>
<!-- 头部 end-->


<!-- 主内容 -->
<section id="bd">

    <ul class="ul-list7">
        <li v-for="e in list">
            <a>
                <div class="pic" v-if="e.TaskStatus===2"><img src="img/icon19.png" alt=""></div>
                <div class="pic" v-else-if="e.TaskStatus===1"><img src="img/part-complete.png" alt=""></div>
                <div class="pic" v-else><img src="img/un-complete.png" alt=""></div>
                <div class="txt">
                    <h3 v-text="e.TaskName"></h3>
                    <p v-text="e.TaskDate"></p>
                </div>
            </a>
        </li>
    </ul>
</section>
<!-- 主内容 end-->


<script src="http://cdn.bootcss.com/jquery/1.11.3/jquery.min.js"></script>
<script type="text/javascript" src="js/lib.js"></script>
<script src="http://cdn.bootcss.com/vue/2.2.6/vue.min.js"></script>
<script src="http://cdn.bootcss.com/axios/0.15.3/axios.min.js"></script>
<script src="js/axios-config.js"></script>
<script>
    var vm=new Vue({
        el:'#bd',
        data:{
            list:[]
        },
        beforeCreate:function () {
            var _=this;
            axios.student('tasklist')
                .then(function (res) {
                    if(res.data.Code===2){
                        goLogin()
                    }else{
                        res.data.List.forEach(function(e){
                            var date=new Date(e.TaskDate);
                            e.TaskDate=date.getMonth()+1+'-'+date.getDate();
                        })

                        res.data.List=res.data.List.reverse()
                        _.list=res.data.List
                    }
                })
        }
    })
</script>


</body>
</html>